1. Field of the Invention
The present invention relates to PCI device drivers, and methods of loading PCI device drivers.
2. Background of the Related Art
It is common for computer systems to include a Basic Input Output System (BIOS) that provides an interface to firmware and is responsible for various tasks, including the identification of system devices and booting the operating system. A BIOS user interface allows for various changes to the system operation. However, while BIOS is still prevalent, newer computer systems may now include an Extensible Firmware Interface (EFI), which includes the more recent Unified Extensible Firmware Interface (UEFI) specification. Like BIOS, the EFI provides a software interface between the operating system and platform hardware. However, EFI runs independent of the processor architecture, includes data tables containing platform information, and provides both boot services and runtime services that are available to the operating system (OS) loader and OS.
The expanded capabilities of the EFI firmware allow a system to boot from larger disks, boot-up in shorter amounts of time, and utilize CPU-independent drivers. Furthermore, EFI supports a shell environment whereby other EFI applications can gain access to the services in the kernel. EFI also allows for extensions to any nonvolatile storage device coupled to the system, such as an EFI partition of an attached hard disk drive.
A server or other computer may have one or more peripheral component interconnect (PCI) Root Bridge with one or more PCI Express (PCIe) devices behind each PCI Root Bridge. Examples of PCI Express (PCIe) devices include Ethernet adapters and Serial Attached SCSI (SAS) adapters. A PCI Root Bridge is represented in UEFI as a device handle that contains a Device Path Protocol instance and a PCI Root Bridge Protocol instance. PCI Bus Drivers manage PCI buses present in a system. A PCI Bus Driver creates child device handles that must contain a Device Path Protocol instance and a PCI I/O Protocol instance. The PCI I/O Protocol for a given PCI device handle is used by a PCI Device Driver to access memory and I/O on the PCI device.
According to the UEFI specification, each PCI device is identified by a device path protocol and a PCI I/O protocol, which collectively define a “device handle.” For a PCI device, a device path protocol represents the location of the device in the system PCI tree starting at the PCI Root Bridge level, and a PCI I/O protocol provides a means for accessing the device. Each PCI adapter has it's own vendor-provided UEFI Driver that reviews all PCI device instances/handles discovered by the PCI bus driver and binds with a PCI device that it is written to support. The process of binding essentially means that an EFI driver is now managing a specific PCI device (referenced via it's handle) and will enable it's full functionality.